<!--
 * @Author: Rachel 943701297@qq.com
 * @Date: 2022-08-24 10:59:13
 * @LastEditors: Rachel 943701297@qq.com
 * @LastEditTime: 2022-08-25 10:10:30
 * @FilePath: \代码c:\Users\94370\Desktop\面向工作学习\笔记\learning-notes\Vue_Code\vue_basic_sgg\SFC\School.vue
 * @Description: 
 * 
 * Copyright (c) 2022 by Rachel 943701297@qq.com, All Rights Reserved. 
-->
<template>
  <div>
    <h2>学校名称：{{ name }}</h2>
    <h2>学校地址：{{ address }}</h2>
    <button @click="showName">点我提示学校名</button>
  </div>
</template>

<script>
export default {
  name: "School",
  data() {
    return {
      name: "尚硅谷",
      address: "北京",
    };
  },
  methods: {
    showName() {
      alert(this.name);
    },
  },
};
</script>

<style>
</style>